import { lazy } from "react";
import {createBrowserRouter} from "react-router-dom"
let Home=lazy(()=>import('../pages/home/Index'))
let Login=lazy(()=>import('../pages/login/Index'))
let Register=lazy(()=>import('../pages/register/Index'))
let Paysuccess=lazy(()=>import('../pages/paysuccess/Index'))
let CpList=lazy(()=>import('../pages/cpList/Index'))
let Chat=lazy(()=>import('../pages/chat/Index'))
let Error=lazy(()=>import('../pages/404'))

let routes=createBrowserRouter([
    {
          path:'/',
          element:<Home></Home>
    
    },
    {
          path:'/home',
          element:<Home></Home>
    
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/register',
        element:<Register></Register>
    },
    {
        path:"/chat",
        element:<Chat></Chat>
    },
    {
        path:'/paysuccess',
        element:<Paysuccess></Paysuccess>
    },
    {
        path:'/cpList',
        element:<CpList></CpList>
    },
    {
        path:'*',
        element:<Error></Error>
    }

])

export default routes